//
//  Button+Extrnsion.swift
//  crkWeibo
//
//  Created by 陈荣科 on 15/12/28.
//  Copyright © 2015年 crk. All rights reserved.
//

import UIKit

extension UIButton{


    convenience init(nameImage:String, fontSize: CGFloat, title: String) {
        self.init()
        
        //设置标题
        setTitle(title, forState: UIControlState.Normal)
        
        //设置图片
        setImage(UIImage(named: nameImage), forState: UIControlState.Normal)
        
        //设置字体颜色
        setTitleColor(UIColor.lightGrayColor(), forState: UIControlState.Normal)
        
        //设置字体大小
        titleLabel?.font = UIFont.systemFontOfSize(fontSize)
    }


}
